<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.15"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>MNN: include/MNNForwardType.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">MNN
   &#160;<span id="projectnumber">1.0</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.8.15 -->
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',false,false,'search.php','搜索');
});
/* @license-end */</script>
<div id="main-nav"></div>
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_d44c64559bbebec7f509842c48db8b23.html">include</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">MNNForwardType.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="_m_n_n_forward_type_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment">//  MNNForwardType.h</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment">//  MNN</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment">//  Created by MNN on 2019/01/19.</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment">//  Copyright © 2018, Alibaba Group Holding Limited</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment">//</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;</div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor">#ifndef MNNForwardType_h</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor">#define MNNForwardType_h</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;</div><div class="line"><a name="l00012"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870">   12</a></span>&#160;<span class="keyword">typedef</span> <span class="keyword">enum</span> {</div><div class="line"><a name="l00013"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7">   13</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7">MNN_FORWARD_CPU</a> = 0,</div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;</div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;    <span class="comment">/*</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment">     Firtly find the first available backends not equal to CPU</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment">     If no other backends, use cpu</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment">     */</span></div><div class="line"><a name="l00019"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ac63d068fa820954b0f5ed5287a8fc420">   19</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ac63d068fa820954b0f5ed5287a8fc420">MNN_FORWARD_AUTO</a> = 4,</div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;</div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;    <span class="comment">/*Hand write metal*/</span></div><div class="line"><a name="l00022"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ab7bf1580c6ae50a3a733b1332b962164">   22</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ab7bf1580c6ae50a3a733b1332b962164">MNN_FORWARD_METAL</a> = 1,</div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;</div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;    <span class="comment">/*Use IOS&#39;s MPS instead of hand-write metal, Not Support yet*/</span></div><div class="line"><a name="l00025"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a7002a862843b80b22803dccf331ebe11">   25</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a7002a862843b80b22803dccf331ebe11">MNN_FORWARD_MPS</a> = 2,</div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;</div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;    <span class="comment">/*Android / Common Device GPU API*/</span></div><div class="line"><a name="l00028"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a67e0ea5ae2f7fb9bd37a17523854bac0">   28</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a67e0ea5ae2f7fb9bd37a17523854bac0">MNN_FORWARD_OPENCL</a> = 3,</div><div class="line"><a name="l00029"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ae94dac42635ce97307b234e29e6fb94f">   29</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ae94dac42635ce97307b234e29e6fb94f">MNN_FORWARD_OPENGL</a> = 6,</div><div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a5c66cc73ee992a46510d23742b0b0f84">   30</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a5c66cc73ee992a46510d23742b0b0f84">MNN_FORWARD_VULKAN</a> = 7,</div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;</div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;    <span class="comment">/*Android 8.1&#39;s NNAPI, Not Support yet*/</span></div><div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a2d7849756a03fc0822fb791f686c895d">   33</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a2d7849756a03fc0822fb791f686c895d">MNN_FORWARD_NN</a> = 5,</div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;    <span class="comment">/*User can use API from Backend.hpp to add or search Backend*/</span></div><div class="line"><a name="l00036"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1c49ad12661ef93f4c5286064db8c481">   36</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1c49ad12661ef93f4c5286064db8c481">MNN_FORWARD_USER_0</a> = 8,</div><div class="line"><a name="l00037"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ad50f220587ddfa0cb78086cb69ff53e3">   37</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ad50f220587ddfa0cb78086cb69ff53e3">MNN_FORWARD_USER_1</a> = 9,</div><div class="line"><a name="l00038"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a103f37f2d78abcf1a55365a60770035b">   38</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a103f37f2d78abcf1a55365a60770035b">MNN_FORWARD_USER_2</a> = 10,</div><div class="line"><a name="l00039"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a7e2b921f32d074e4812bc03dac74ba89">   39</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a7e2b921f32d074e4812bc03dac74ba89">MNN_FORWARD_USER_3</a> = 11,</div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;</div><div class="line"><a name="l00041"></a><span class="lineno"><a class="line" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a47d788d461947a7c182652cb77a3b2f7">   41</a></span>&#160;    <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a47d788d461947a7c182652cb77a3b2f7">MNN_FORWARD_ALL</a></div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;} <a class="code" href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870">MNNForwardType</a>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="keyword">namespace </span><a class="code" href="namespace_m_n_n.html">MNN</a> {</div><div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="keyword">struct </span>BackendConfig {</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;    <span class="keyword">enum</span> MemoryMode {</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;        Memory_Normal = 0,</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;        Memory_High,</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;        Memory_Low</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    };</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    </div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    MemoryMode memory = Memory_Normal;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    </div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    <span class="keyword">enum</span> PowerMode {</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;        Power_Normal = 0,</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        Power_High,</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;        Power_Low</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    };</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    </div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    PowerMode power = Power_Normal;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    </div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    <span class="keyword">enum</span> PrecisionMode {</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;        Precision_Normal = 0,</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;        Precision_High,</div><div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;        Precision_Low</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;    };</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    </div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    PrecisionMode precision = Precision_Normal;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    </div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;    <span class="keywordtype">void</span>* sharedContext = <span class="keyword">nullptr</span>;</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;};</div><div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;};</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#endif</span></div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* MNNForwardType_h */</span><span class="preprocessor"></span></div><div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870">MNNForwardType</a></div><div class="ttdeci">MNNForwardType</div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:12</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870ad50f220587ddfa0cb78086cb69ff53e3"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ad50f220587ddfa0cb78086cb69ff53e3">MNN_FORWARD_USER_1</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:37</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a7002a862843b80b22803dccf331ebe11"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a7002a862843b80b22803dccf331ebe11">MNN_FORWARD_MPS</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:25</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a47d788d461947a7c182652cb77a3b2f7"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a47d788d461947a7c182652cb77a3b2f7">MNN_FORWARD_ALL</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:41</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a7e2b921f32d074e4812bc03dac74ba89"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a7e2b921f32d074e4812bc03dac74ba89">MNN_FORWARD_USER_3</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:39</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870ac63d068fa820954b0f5ed5287a8fc420"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ac63d068fa820954b0f5ed5287a8fc420">MNN_FORWARD_AUTO</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:19</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a2d7849756a03fc0822fb791f686c895d"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a2d7849756a03fc0822fb791f686c895d">MNN_FORWARD_NN</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:33</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1bc14cf5e3ca09921de9a28ec70a47c7">MNN_FORWARD_CPU</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:13</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a5c66cc73ee992a46510d23742b0b0f84"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a5c66cc73ee992a46510d23742b0b0f84">MNN_FORWARD_VULKAN</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:30</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870ae94dac42635ce97307b234e29e6fb94f"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ae94dac42635ce97307b234e29e6fb94f">MNN_FORWARD_OPENGL</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:29</div></div>
<div class="ttc" id="namespace_m_n_n_html"><div class="ttname"><a href="namespace_m_n_n.html">MNN</a></div><div class="ttdef"><b>Definition:</b> AutoTime.hpp:16</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a1c49ad12661ef93f4c5286064db8c481"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a1c49ad12661ef93f4c5286064db8c481">MNN_FORWARD_USER_0</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:36</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a67e0ea5ae2f7fb9bd37a17523854bac0"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a67e0ea5ae2f7fb9bd37a17523854bac0">MNN_FORWARD_OPENCL</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:28</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870a103f37f2d78abcf1a55365a60770035b"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870a103f37f2d78abcf1a55365a60770035b">MNN_FORWARD_USER_2</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:38</div></div>
<div class="ttc" id="_m_n_n_forward_type_8h_html_ab63ddb976d555083197683a1b1940870ab7bf1580c6ae50a3a733b1332b962164"><div class="ttname"><a href="_m_n_n_forward_type_8h.html#ab63ddb976d555083197683a1b1940870ab7bf1580c6ae50a3a733b1332b962164">MNN_FORWARD_METAL</a></div><div class="ttdef"><b>Definition:</b> MNNForwardType.h:22</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者 &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.15
</small></address>
</body>
</html>
